Repository navigation
refactor: company card feed types and utils - #80006
carlosmiceli merged 32 commits into
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@marcochavezf Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac25b86ab2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Reviewer Checklist
|
|
@ikevin127 @carlosmiceli all tests passing now! |
|
🚧 @carlosmiceli has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.3.17-0 🚀
|
|
Hi @chrispader. Any QA steps here? |
|
@IuliiaHerets @carlosmiceli i don't think we'll need QA on this one, right? It's mainly refactoring and types. Otherwise, the QA would just be to make sure everything works as expected, especially around the Workspace -> Company Cards flow |
|
@chrispader can we check it off in this case? |
@carlosmiceli wdyt? |
|
@IuliiaHerets I think QAing going through all the usual tests in the company cards assignment section is a good idea, we're making changes consistently to this flow and anything could introduce a bug these days 🙏 |
|
@carlosmiceli please share the QA steps then |
|
I'll let @chrispader propose that list 👍 |
|
@IuliiaHerets i've added some basic QA steps for the company cards functionality |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.17-9 🚀
|
| const cardFeedKeyParts = key.split('_'); | ||
| const feedDomainID = Number(cardFeedKeyParts.at(1)); | ||
| if (cardFeedKeyParts.length !== 3 || cardFeedKeyParts.at(0) !== ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST || Number.isNaN(feedDomainID)) { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Coming from #82554 checklist:
When assigning a direct-feed company card to a workspace, the app should detect if that card is already assigned to another workspace and show an error. so length check fails for plaid.ins_19 feeds (4 parts instead of 3)
Approvers in a submitter's approval chain are auto-added to that submitter's policy expense chat, so they show up in the chat's member list without ever being workspace admins. Nothing pinned what the removal guard does with them. Add three cases to isRoomMemberProtectedByPolicyRole covering an approval chain built from submitsTo, forwardsTo and policy.approver: a non-admin approver stays removable, an approver holding the admin role is protected, and an approver who owns the policy is protected by ownerAccountID. The non-admin case is the behavior that existed before Expensify#80006 replaced isUserPolicyAdmin(policy, login) with isPolicyAdmin(policy, login), and it matches the workspace Members page, which lets an admin remove an approver outright and reroutes their approval workflows to the workspace owner. Pinning it means any future decision to protect approvers in the chat has to be deliberate.
@carlosmiceli @joekaufmanexpensify
Explanation of Change
Refactorings around types and utils for company card feeds.
Fixed Issues
#76438
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari